Users with

<?php
/* 
 * This view shows all users with a specific interest.
 */
//Initializing table for structure of users.
$TABLE = array();

//Checking if the user has any friends.
if (count($results))
    {
        //Creates a name-string & image for each friends.
	foreach ($results as $id => $person)
        {
            $string = anchor("users/home/".$person->id,$person->first_name . " ". $person->last_name);
            $string .= br();

            $properties = array(
                                    'src' => 'users/get_photo/'. $person->id,
                                    'width' => '120',
                                    'height' => '110'
            );
            $string .= img($properties,true);

            $properties = array();
            $string .= br();



            $TABLE[] = $string;
    }

    //Structuring the table, so the result looks pretty using the CI_table
    $tmpl = array (
            'table_open'  => "<table class='grid'>",
            'row_start'   => "<tr valign='top'>",
    );
    $this->table->set_template($tmpl);
    $this->table->set_empty("&nbsp;");
    $pretty = $this->table->make_columns($TABLE,4);

    echo $this->table->generate($pretty);



}else{
	echo "Sorry, no search results matched that query!";
}

?>
